package com.nandi.emergencyinspection.ui.adapter

import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.module.LoadMoreModule
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.nandi.emergencyinspection.R
import com.nandi.emergencyinspection.bean.TaskListBean

/**
 * @创建者: qingsong
 * @创建时间: 2021/3/25 16:15
 * @描述:
 */
class ListAdapter(data: MutableList<TaskListBean.RecordsBean?>) :
    BaseQuickAdapter<TaskListBean.RecordsBean?, BaseViewHolder>(R.layout.task_list_item, data),
    LoadMoreModule {
    override fun convert(
        holder: BaseViewHolder, item: TaskListBean.RecordsBean?
    ) {
        holder.setText(R.id.task_name, item?.name)
        holder.setText(R.id.disaster_name, item?.disasterName)
        holder.setText(R.id.address, item?.location)
        holder.setText(R.id.create_time, item?.createTime.toString())
    }
}